package com.yu.thread5;

/**
 * Created by xiaolongyu on 15/3/19.
 */
public class PairManager2 extends PairManager {

    @Override
    public void increment() {
        System.out.println("increment2:" + p);
        Pair temp;
        synchronized (this){
            p.incrementX();
            p.incrementY();
            temp = getPair();
        }
        store(temp);
    }
}
